package org.ucas.kgraph.entity;

import java.util.*;

/**
 * 包含词条节点和各种关联的图形结构表现
 *
 * @author suemi
 */
public class TermGraph {

  public final Long rootId;

  public final Set<Term> terms;

  public final Set<Relation> relations;

  private final Map<Long,Term> termMap = new HashMap<>();


  public TermGraph(Long rootId, Set<Term> terms, Set<Relation> relations) {
    this.rootId = rootId;
    this.terms = terms;
    this.relations = relations;
  }

  public TermGraph(Long rootId, Collection<Term> terms, Collection<Relation> relations) {
    this.rootId = rootId;
    this.terms = new HashSet<>(terms);
    this.relations = new HashSet<>(relations);
  }

  public TermGraph(Long rootId){
    this(rootId,new HashSet<Term>(),new HashSet<Relation>());
  }

  public void addEdge(Relation r){

  }

  public void addVertex(Term t){

  }
}
